package com.xuebank.nfe.nfecar.globals;


import com.xuebank.nfe.nfecar.BuildConfig;
import com.xuebank.nfe.nfecar.MyApplication;
import com.xuebank.nfe.nfecar.utils.network.ServiceGenerator;

/**
 * Created by admin Mr.WANG 2017/5/25.
 */

public class Constants {

    public static final boolean IS_RELEASE = !BuildConfig.DEBUG;

    public static final String LOGIN_RELEASE="LOGIN_RELEASE";//从哪个页面进入的发布页面
    public static final String ALBUM ="ALBUM";//相册页面
    public static final String DRAFT = "DRAFT";//草稿页面

//    public static final String JAQ_KEY = BuildConfig.JAQ_KEY;
    public static final String ACTION_DO_FIRST_INIT = "DO_FIRST_INIT";//先做初始化

    public static final String VERSION_CODE = "";//版本号

    public static final String GUIDE_IS_DONE = "GUIDE_IS_DONE";//引导是否完成

    public static final String ACTION_EXIT_APP = "ACTION_EXIT_APP"; //退出app
    public static final String LOGIN_USER = "LOGIN_USER";//登录以后保存的用户信息
    //开发模式 显示log、生命周期等 // TODO: 2017/4/26 正式环境服务器
    public static int DEVMODE=getServiceModel();  //todo
    public static String DEVELOPMENT_ENVIRONMENT = "" ;//todo  H5环境
    public static final String BUGLY_APP_ID = "92d57bed76";//bugly appid
    @ServiceHostConfigInterface
    public static int getServiceModel() {
        if (MyApplication.Companion.getAPP_Environmental() != 5) {
            DEVMODE = MyApplication.Companion.getAPP_Environmental();
        } else {
            DEVMODE = IS_RELEASE ? ServiceHostConfig.SERVICE_UAT : ServiceHostConfig.SERVICE_UAT;  //todo
        }
        return DEVMODE;
    }
    public static void setServiceModel(int uNeedModel) {
        DEVMODE = uNeedModel;
    }

    public final class ServiceHostConfig {
        public static final int SERVICE_ONLINE = 0;
        public static final int SERVICE_PRE = 1;
        public static final int SERVICE_UAT = 2;
        public static final int SERVICE_SIT = 3;

    }
    public @interface ServiceHostConfigInterface {
    }
    private static final String APP_DIR = "/zhanzhao";
    public static final String APP_DOWNLOAD = APP_DIR + "/download";
    public static final String APP_DOWNLOAD_APK_NAME = "NfeCar.apk";

    //首页地址
    public static final String HOME_URL = "/nfeboot";
    //发现地址
    public static final String DISCOVER_URL = "http://test.nfeapp.cn/html/carRefit/index.html#/discover?ingoreTabSkip=true";

    public static final String NEWS_URL = "http://test.nfeapp.cn/html/carRefit/#/information?ingoreTabSkip=true";
    //我的地址
    public static final String MINE_URL = "http://test.nfeapp.cn/html/carRefit/index.html#/user?ingoreTabSkip=true";


    public static final String CARJI_LIST = "http://test.nfeapp.cn/html/carRefit/#/myCarDown?mode=open";

    //登录地址
    public static final String LOGIN_ADDRESS = "http://test.nfeapp.cn/html/carRefit/#/login?mode=open";

    //车记列表
    public static final String CAR_LIST = "http://test.nfeapp.cn/html/carRefit/index.html#/carDown?ingoreTabSkip=true";

    //测试图片格式
    public static final String IMAGE_TYPE = " https://exif.tuchong.com/";

    public static final String TAG_DETETE_TOP = "TAG_DETETE_TOP";
    public static final String TAG_DETETE_BOTTON = "TAG_DETETE_BOTTON";











//    //首页地址
//    public static final String HOME_URL = "http://192.168.1.100:8080/index.html#/index?ingoreTabSkip=true";
//    //发现地址
//    public static final String DISCOVER_URL = "http://192.168.1.100:8080/index.html#/discover?ingoreTabSkip=true";
//    //我的地址
//    public static final String MINE_URL = "http://192.168.1.100:8080/index.html#/user?ingoreTabSkip=true";


    /**
     *     微信部分
     */
    //微信申请的appid
    public static final String WECHAT_APP_ID = "wx913bc60f220ac501";
    //微信返回成功值
    public static final String WECHAT_CALLBACK_SUCCESS = "WECHAT_CALLBACK_SUCCESS";
    //发送取消
    public static final String WECHAT_SEND_CANCEL = "WECHAT_SEND_CANCEL";
    //被拒绝
    public static final String WECHAT_AUTH_DENIED = "WECHAT_AUTH_DENIED";
    //发送错误返回
    public static final String WECHAT_DEFAULT_ERRCODE = "WECHAT_DEFAULT_ERRCODE";

    public static final String LABEL = "LABEL";

    public Constants() {
    }
    public static String getH5Url() {
        return "https://"+ ServiceGenerator.INSTANCE.getRootUrl();
    }

}
